package com.laxcen.basiclib.core.update;



import com.laxcen.basiclib.BaseApp;
import com.laxcen.basiclib.BaseConst;
import com.laxcen.basiclib.core.broadcast.BroadcastManager;
import com.laxcen.basiclib.ui.activity.WebActivity;

import java.util.HashMap;
import java.util.Map;

/**
 * 更新之后向服务端推送更新结果
 */
public class UpdatePush {
    public static void updateResult(boolean isH5, boolean isSuccess){
        if(isH5&&isSuccess) {
            Map<String, Object> map = new HashMap<>();
            map.put("type", BaseConst.ACTION_H5_UPLOADED);
            BroadcastManager.getInstance(BaseApp.getApp()).sendBroadcast(WebActivity.ON_WEB_UPDATE, map);
        }
    }
    public class UpdateBean{
        private boolean isH5;
        private boolean isSuccess;
        private String phoneUUID;

        public boolean isH5() {
            return isH5;
        }

        public void setH5(boolean h5) {
            isH5 = h5;
        }

        public boolean isSuccess() {
            return isSuccess;
        }

        public void setSuccess(boolean success) {
            isSuccess = success;
        }

        public String getPhoneUUID() {
            return phoneUUID;
        }

        public void setPhoneUUID(String phoneUUID) {
            this.phoneUUID = phoneUUID;
        }
    }
}
